import { createRouter, createWebHistory  } from "vue-router";
// import Template from "../views/template";
// import Test from "../views/Test.vue";
// import Test2 from "../views/Test2.vue"

const template = () => import('@/views/template');
const routes = [
  {
    path: '/',
    component: template,
    children: [{
      path: "proxy",
      name: "proxy",
      component: () =>
      import(/* webpackChunkName: "about" */ "../views/iframe"),
    }]
  },
  // {
  //   path: "/proxy",
  //   name: "About",
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: template
  // },
  {
    path: "/about",
    name: "About",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/About.vue"),
  },
];

const router = createRouter({
  mode: 'history',
  history: createWebHistory (),
  routes,
});

export default router;
